package com.hfi.security.core.validate.code.image;

import com.hfi.security.core.validate.code.ValidateCode;

import java.awt.image.BufferedImage;
import java.time.LocalDateTime;

/**
 * @author ChangLiang
 * @date 2019/8/13
 */
public class ImageCode extends ValidateCode {

    private BufferedImage image;

    /**
     * 构造的时候 传一个秒数
     * @param image
     * @param code
     * @param expireTime 比如60秒过期
     */
    public ImageCode(BufferedImage image, String code, int expireTime) {
        super(code, expireTime);
        this.image = image;
    }

    public ImageCode(BufferedImage image, String code, LocalDateTime expireTime) {
        super(code, expireTime);
        this.image = image;
    }

    public BufferedImage getImage() {
        return image;
    }

    public void setImage(BufferedImage image) {
        this.image = image;
    }
}
